jconed.toolbar.register_handler ( 'ForeColor', function ( editor )
{
	var f = new liwe.form.instance ( 'jconed-color', 'no-action' );
	f.text ( { label: 'Color', name: 'color', size: 7, onclick: 'ColorPicker.show(this)' } );
	f.submit ( 'Update' );
	f.events [ 'submit' ] = function ()
	{
		ColorPicker.hide ();
		var color = f.get_value ( 'color' ) ;
		jconed.execute ( 'foreColor', color );
		return false;
	};
	jconed.toolbar.set_context ( f.get () );
} );

jconed.toolbar.register_handler ( 'BackColor', function ( editor )
{
	var f = new liwe.form.instance ( 'jconed-color', 'no-action' );
	f.text ( { label: 'Color', name: 'color', size: 7, onclick: 'ColorPicker.show(this)' } );
	f.submit ( 'Update' );
	f.events [ 'submit' ] = function ()
	{
		ColorPicker.hide ();
		var color = f.get_value ( 'color' ) ;
		jconed.execute ( 'backColor', color );
		return false;
	};
	jconed.toolbar.set_context ( f.get () );
} );

jconed.toolbar.register_handler ( 'HiliteColor', function ( editor )
{
	var f = new liwe.form.instance ( 'jconed-color', 'no-action' );
	f.text ( { label: 'Color', name: 'color', size: 7, onclick: 'ColorPicker.show(this)' } );
	f.submit ( 'Update' );
	f.events [ 'submit' ] = function ()
	{
		ColorPicker.hide ();
		var color = f.get_value ( 'color' ) ;
		jconed.execute ( 'hiliteColor', color );
		return false;
	};
	jconed.toolbar.set_context ( f.get () );
} );
